Optimal. Leaf size=55 \[ \frac{\tanh ^{-1}(\sin (e+f x))}{b f}-\frac{\sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \sin (e+f x)}{\sqrt{a+b}}\right )}{b f \sqrt{a+b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0717949, antiderivative size = 55, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {4147, 391, 206, 208} \[ \frac{\tanh ^{-1}(\sin (e+f x))}{b f}-\frac{\sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \sin (e+f x)}{\sqrt{a+b}}\right )}{b f \sqrt{a+b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4147
Rule 391
Rule 206
Rule 208
Rubi steps
\begin{align*} \int \frac{\sec ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{\left (1-x^2\right ) \left (a+b-a x^2\right )} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\sin (e+f x)\right )}{b f}-\frac{a \operatorname{Subst}\left (\int \frac{1}{a+b-a x^2} \, dx,x,\sin (e+f x)\right )}{b f}\\ &=\frac{\tanh ^{-1}(\sin (e+f x))}{b f}-\frac{\sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \sin (e+f x)}{\sqrt{a+b}}\right )}{b \sqrt{a+b} f}\\ \end{align*}
Mathematica [C] time = 2.02713, size = 1022, normalized size = 18.58 \[ \frac{(\cos (2 (e+f x)) a+a+2 b) \sec ^2(e+f x) \left (-4 \sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2} \log \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right )-\sqrt{a} \cos (e) \log \left (-\cos (2 (e+f x)) a-2 i \sin (2 e) a+a+2 \sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2} \sin (f x) \sqrt{a}+2 \sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2} \sin (2 e+f x) \sqrt{a}+2 (a+b) \cos (2 e)-2 i b \sin (2 e)\right )+\sqrt{a} \cos (e) \log \left (\cos (2 (e+f x)) a+2 i \sin (2 e) a-a+2 \sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2} \sin (f x) \sqrt{a}+2 \sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2} \sin (2 e+f x) \sqrt{a}-2 (a+b) \cos (2 e)+2 i b \sin (2 e)\right )-2 i \sqrt{a} \tan ^{-1}\left (\frac{2 \sin (e) \left (\sin (2 e) a+i a-i \sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2} \sin (f x) \sqrt{a}-i \sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2} \sin (2 e+f x) \sqrt{a}+\sqrt{a+b} \cos (f x) \sqrt{(\cos (e)-i \sin (e))^2} \sqrt{a}-\sqrt{a+b} \cos (2 e+f x) \sqrt{(\cos (e)-i \sin (e))^2} \sqrt{a}+i b+i (a+b) \cos (2 e)+b \sin (2 e)\right )}{i (a+3 b) \cos (e)+i (a+b) \cos (3 e)+i a \cos (e+2 f x)+i a \cos (3 e+2 f x)+3 a \sin (e)+b \sin (e)+a \sin (3 e)+b \sin (3 e)+a \sin (e+2 f x)-a \sin (3 e+2 f x)}\right ) (\cos (e)-i \sin (e))+i \sqrt{a} \log \left (-\cos (2 (e+f x)) a-2 i \sin (2 e) a+a+2 \sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2} \sin (f x) \sqrt{a}+2 \sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2} \sin (2 e+f x) \sqrt{a}+2 (a+b) \cos (2 e)-2 i b \sin (2 e)\right ) \sin (e)-i \sqrt{a} \log \left (\cos (2 (e+f x)) a+2 i \sin (2 e) a-a+2 \sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2} \sin (f x) \sqrt{a}+2 \sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2} \sin (2 e+f x) \sqrt{a}-2 (a+b) \cos (2 e)+2 i b \sin (2 e)\right ) \sin (e)+2 \sqrt{a} \tan ^{-1}\left (\frac{(a+b) \sin (e)}{(a+b) \cos (e)-\sqrt{a} \sqrt{a+b} \sqrt{(\cos (e)-i \sin (e))^2} (\cos (2 e)+i \sin (2 e)) \sin (e+f x)}\right ) (i \cos (e)+\sin (e))+4 \sqrt{a+b} \log \left (\cos \left (\frac{1}{2} (e+f x)\right )+\sin \left (\frac{1}{2} (e+f x)\right )\right ) \sqrt{(\cos (e)-i \sin (e))^2}\right )}{8 b \sqrt{a+b} f \left (b \sec ^2(e+f x)+a\right ) \sqrt{(\cos (e)-i \sin (e))^2}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.059, size = 68, normalized size = 1.2 \begin{align*}{\frac{\ln \left ( \sin \left ( fx+e \right ) +1 \right ) }{2\,fb}}-{\frac{a}{fb}{\it Artanh} \left ({a\sin \left ( fx+e \right ){\frac{1}{\sqrt{ \left ( a+b \right ) a}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) a}}}}-{\frac{\ln \left ( \sin \left ( fx+e \right ) -1 \right ) }{2\,fb}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.557766, size = 405, normalized size = 7.36 \begin{align*} \left [\frac{\sqrt{\frac{a}{a + b}} \log \left (-\frac{a \cos \left (f x + e\right )^{2} + 2 \,{\left (a + b\right )} \sqrt{\frac{a}{a + b}} \sin \left (f x + e\right ) - 2 \, a - b}{a \cos \left (f x + e\right )^{2} + b}\right ) + \log \left (\sin \left (f x + e\right ) + 1\right ) - \log \left (-\sin \left (f x + e\right ) + 1\right )}{2 \, b f}, \frac{2 \, \sqrt{-\frac{a}{a + b}} \arctan \left (\sqrt{-\frac{a}{a + b}} \sin \left (f x + e\right )\right ) + \log \left (\sin \left (f x + e\right ) + 1\right ) - \log \left (-\sin \left (f x + e\right ) + 1\right )}{2 \, b f}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec ^{3}{\left (e + f x \right )}}{a + b \sec ^{2}{\left (e + f x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.30815, size = 104, normalized size = 1.89 \begin{align*} \frac{\frac{2 \, a \arctan \left (\frac{a \sin \left (f x + e\right )}{\sqrt{-a^{2} - a b}}\right )}{\sqrt{-a^{2} - a b} b} + \frac{\log \left (\sin \left (f x + e\right ) + 1\right )}{b} - \frac{\log \left (-\sin \left (f x + e\right ) + 1\right )}{b}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]